import { ResouceConst } from "../../../component/gconst/ResouceConst";
import { ImagesConst } from "../../resource/ImagesConst";
import { WelfareListBody } from "./WelfareListBody";
import { GScrollPane } from "../../../../com/mui/controls/GScrollPane";
import { ScrollPolicy } from "../../../../fl/controls/ScrollPolicy";
import { WelfarePreferenPanel } from "./WelfarePreferenPanel";
import { SVIPInfo } from "../../../../Message/Game/SVIPInfo";
import { SAttribute } from "../../../../Message/Public/SAttribute";
import { SMoney } from "../../../../Message/Game/SMoney";
import { SPanicBuyRefreshMsg } from "../../../../Message/Game/SPanicBuyRefreshMsg";
import { ScaleBitmap } from "../../../../com/mui/display/ScaleBitmap";
type int = number;
//class WelfareGetPanel
    
    export  class WelfareGetPanel /* flash.display.Sprite */
    {
        constructor(arg1: int, arg2: int)
        {
            
            this._width = arg1;
            this._height = arg2;
            this._preferenWidth = 215;
            this._listWidth = this._width - this._preferenWidth - 2;
            this.initUI();
            return;
        }

        /* internal  */initUI(): void
        {
            this._listBg = ResouceConst.getScaleBitmap(ImagesConst.WindowCenterB);
            this._listBg.setSize(this._listWidth, this._height);
            addChild(this._listBg);
            this._listBody = new WelfareListBody();
            this._scrollPane = new GScrollPane();
            this._scrollPane.x = 5;
            this._scrollPane.y = 5;
            this._scrollPane.width = this._listWidth - 10;
            this._scrollPane.height = this.height - this._scrollPane.y - 2;
            this._scrollPane.styleName = "GScrollPane";
            this._scrollPane.verticalScrollPolicy = ScrollPolicy.OFF;
            this._scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
            this._scrollPane.source = this._listBody;
            this._scrollPane.scrollDrag = false;
            this._scrollPane.focusEnabled = false;
            addChild(this._scrollPane);
            this._preferenPanel = new WelfarePreferenPanel();
            this._preferenPanel.setSize(this._preferenWidth, this._height);
            this._preferenPanel.x = this._listWidth + 2;
            this._preferenPanel.y = 0;
            addChild(this._preferenPanel);
            return;
        }

        public updateVIPInfo(arg1: SVIPInfo): void
        {
            this._listBody.updateVIPInfo(arg1);
            return;
        }

        public updateVIPBlessState(arg1: Boolean): void
        {
            this._listBody.updateVIPBlessState(arg1);
            return;
        }

        public updateOffLineExp(): void
        {
            this._listBody.updateOffLineExp();
            return;
        }

        public updatePackItem(): void
        {
            this._listBody.updatePackItem();
            return;
        }

        public updateCopyExp(): void
        {
            this._listBody.updateCopyExp();
            return;
        }

        public updateContinuousLoadInfo(arg1: SAttribute): void
        {
            this._listBody.updateContinuousLoadInfo(arg1);
            return;
        }

        public updateRoleMoney(arg1: SMoney): void
        {
            this._preferenPanel.updateRoleMoney(arg1);
            return;
        }

        public updatePanicBuyItemMsg(arg1: SPanicBuyRefreshMsg): void
        {
            this._preferenPanel.updatePanicBuyItemMsg(arg1);
            return;
        }

        public refreshPanicBuyData(arg1: Object): void
        {
            this._preferenPanel.refreshDataProvider(arg1);
            return;
        }

        public /* override */ get width(): number
        {
            return this._width;
        }

        public /* override */ get height(): number
        {
            return this._height;
        }

        /* internal */ /* var */_width: int;

        /* internal */ /* var */_height: int;

        /* internal */ /* var */_listWidth: int;

        /* internal */ /* var */_preferenWidth: int;

        /* internal */ /* var */_listBg: ScaleBitmap;

        /* internal */ /* var */_preferenPanel: WelfarePreferenPanel;

        /* internal */ /* var */_listBody: WelfareListBody;

        /* internal */ /* var */_scrollPane: GScrollPane;
    }
